import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import get from '@dfeidao/atom-mobile/local/get';
// import remove from '@dfeidao/atom-mobile/local/remove';
// import set from '@dfeidao/atom-mobile/local/set';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';

// import toast from '@dfeidao/atom-mobile/msgbox/toast';
import { Alert } from 'react-native';





export default async function a003(fd: IFeidaoAiMobile) {
	// 保存

	try {
		const productid = get(fd, 'productid');

		// const body = JSON.stringify(user);
		// const res = await post(login, body) as { usercode: string, user_name: string, productid: string, sessionID: string };
		// await set('user', JSON.stringify(res));
		const review_content = '古古怪怪';
		const obj = { review_content };
		const res = await nodejs<{ code: number, msg: string }>('app-review-content/s003', { obj, productid });
		if (res.code === 1) {
			Alert.alert('删除成功');
		}
		// fd.page.props.navigation.navigate('app_home');
	} catch (err) {
		Alert.alert(err.message);
	}

}
